home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
index.arc
/
AEMRKCLS.BAS
< prev
next >
Wrap
BASIC Source File
|
1987-01-11
|
1KB
|
41 lines
rem $linesize:132
rem $title:'Application Engineer Standard Routines'
rem $subtitle:'Mark the status flag on a file to CLOSED'
' Include the COMMON values
rem $include:'AESHARED.BAS'
sub Mark.File.Closed(fl%,rlen%) static
field #fl%,1 as stat$,2 as n.av$,2 as l.av$,1 as mj$,1 as mn$,1 as bug.fix$
field #fl%,8 as dummy$,r% as filler$
' stat$ = Status (1 = Open / 2 = Closed)
' n.av$ = Next available record
' l.av$ = Last available record
' mj$ = Application Engineer Major release version
' mn$ = Application Engineer Minor release version
' bug.fix$ = Bug fix code within Minor release
get #fl%,1%
if mj$<>chr$(0%) or _
mn$<>chr$(0%) or _
bug.fix$<>"B" _
then
call ae.error("MFC Version mismatch error. Action 01")
end if
st%=asc(stat$)
if st%=1% then ' File is open, lets close
lset stat$=chr$(2%) ' Value for file CLOSE
put #fl%,1%
elseif st%=2% then ' File is open ! Probably corrupt
call ae.error("MFC File not previously opened properly. Action 07")
else ' Corrupt through other means
call ae.error("MFC File is corrupt. Action 06"+str$(st%))
end if
end sub